package cn.edu.sgu.www.mhxysy.dto.jingmai;

import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class JingmaiCategoryDTO implements DataTransferObject {

    @ApiModelProperty(value = "ID")
    private Integer id;

    /**
     * 经脉名称
     */
    @NotBlank(message = "经脉名称" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "经脉名称", required = true)
    private String name;

    /**
     * 经脉类型
     */
    @Positive(message = "经脉类型" + CustomMessages.ILLEGAL)
    @NotNull(message = "经脉类型" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "经脉类型", required = true)
    private Integer type;

    /**
     * 激活效果
     */
    @NotBlank(message = "激活效果" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "激活效果", required = true)
    private String activeEffect;

    /**
     * 镶嵌效果
     */
    @ApiModelProperty(value = "镶嵌效果")
    private String inlayEffect;

    /**
     * 序号
     */
    @Range(min = 0, max = 7, message = "序号" + CustomMessages.ILLEGAL)
    @NotNull(message = "序号" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "序号", required = true)
    private Integer seq;

    /**
     * 前置经脉ID
     */
    @ApiModelProperty(value = "前置经脉ID")
    private Integer prevId;

    /**
     * 后置经脉ID
     */
    @ApiModelProperty(value = "后置经脉ID")
    private Integer nextId;

    /**
     * 方向
     */
    @Range(min = 0, max = 2, message = "方向" + CustomMessages.ILLEGAL)
    @NotNull(message = "方向" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "方向", required = true)
    private Integer direction;

    /**
     * 门派ID
     */
    @Positive(message = "门派ID" + CustomMessages.ILLEGAL)
    @NotNull(message = CustomMessages.SCHOOL_ID_NOT_NULL)
    @ApiModelProperty(value = "门派ID", required = true)
    private Integer schoolId;
}